<extend name="Public/base"/>
<block name="body">
  
	<!-- 标题栏 -->
	<div class="main-title">
		<h2>{$meta_title}</h2>
	</div>

	    <div  class="with-padding">
                <div class="fl">
                    <a href="__ROOT__/Application/Chengji/Static/tmplfile/grade_student_score.xlsx" class="btn btn-success">下载导入模板</a>&nbsp;
                    
                    <a href="{:U('addClass')}" class="btn btn-ajax btn-success btn">新增</a>&nbsp;
                    <button class="btn ajax-post btn-info" url="/web2016/index.php?s=/admin/keti/setcategorystatus.html&amp;status=1" target-form="ids">启用</button>&nbsp;
                    <button class="btn ajax-post btn-warning btn" url="/web2016/index.php?s=/admin/keti/setcategorystatus.html&amp;status=0" target-form="ids">禁用</button>&nbsp;
                    <button class="btn ajax-post btn-danger btn" url="/web2016/index.php?s=/admin/keti/setcategorystatus.html&amp;status=-1" target-form="ids">删除</button>&nbsp;
                </div>
            </div>

<link href="__ZUI__/css/zui.min.css" rel="stylesheet">    
<link href="__ZUI__/lib/uploader/zui.uploader.min.css" rel="stylesheet">
<script src="__ZUI__/js/zui.min.js"></script>
<script src="__ZUI__/lib/uploader/zui.uploader.min.js"></script>
    <div class="with-padding">
        <form id="import_form" action="{:U('doGradescoreUpload')}" enctype="multipart/form-data" method="post" class="form-horizontal">
          <input name="id" type="hidden" value="{$student_info.id}" />
            <div class="form-group">
              <label class="col-sm-1 control-label no-padding-right" for="kid"> 考试名称：</label>
              <div class="col-sm-7">
               <select name="kid">
                 <option value="">请选择考试内容</option>
                    <volist name="kaoshi_list" id="vo">
                        
                   <if condition="($vo.id eq $kaoshi['kid'])"> 
                      <option  selected value="{$vo.id}">{$vo.name}</option>  
                   <else/>
                     <option value="{$vo.id}">{$vo.name}</option>
                   </if>
                  </volist>
                  </select>
              </div>
            </div>
            <div class="form-group">
            <label class="col-sm-1 control-label no-padding-right" for="excelData"> Excel表格：</label>
            <div class="col-sm-7">
              <div class="input-group"><span class="input-group-addon"><a onclick="$('input[id=lefile]').click();"><i class="icon icon-plus"></i>   选择文件</a>
              
              </span>
              <input id="lefile" class="form-control" type="file" name="excelData" style="display:none;" />               
              <input id="files-text" class="form-control" type="text"  onclick="$('input[id=lefile]').click();" /> 
              
              </div>              
             <label class="help-block">成绩汇总上传： <span class="check-tips">（请上传Excel电子文档）</span> </label>
            </div>
            </div>
            <div class="form-group">
               <div class="col-md-offset-1 col-md-9">
               <input type="submit" class="btn btn-primary" value="导入系统" />
               </div>
            </div>


           <script type="text/javascript">
            $('input[id=lefile]').change(function() {
              // $('#files-text').val($(this).val());
              filePath=$(this).val();
              str_split=filePath.split("\\");
              strFileName=str_split[str_split.length - 1];//分割出带扩展名的文件名
              //alert(strFileName);            
              //strFileName=filePath.replace(/^.+?\\([^\\]+?)(\.[^\.\\]*?)?$/gi,"$1");//过滤后仅剩文件名不带扩展名   
              $('#files-text').val(strFileName);
            });
            </script>
         
        <div class="form-group">
          <label class="col-md-1 control-label" >Excel表格：</label>
          <div class="col-md-6">
                <input type="file" name="excelData2" value="" />
                <span class="Validform_checktip"></span>
            </div>
        </div>

        <div class="form-group">
        <div class="col-md-9">
          <img  src="__PUBLIC__/images/loading.gif" style="display:none;"/>

          <input type="submit" class="btn btn-primary" value="导入" />
          </div>
        </div>
    </form>
    </div>

<div id='uploaderExample' class="uploader" data-ride="uploader" data-url="{:U('Chengji/Chengji/doGradescoreUpload')}">
测试uploader代码
  <div class="uploader-message text-center">
    <div class="content"></div>
    <button type="button" class="close">×</button>
  </div>
  <div class="uploader-files file-list file-list-lg" data-drag-placeholder="请拖拽文件到此处"></div>
  <div class="uploader-actions">
    <div class="uploader-status pull-right text-muted"></div>
    <button type="button" class="btn btn-link uploader-btn-browse"><i class="icon icon-plus"></i> 选择文件</button>
    <button type="button" class="btn btn-link uploader-btn-start"><i class="icon icon-cloud-upload"></i> 开始上传</button>
  </div>
</div>
<script type="text/javascript">
// $('#uploaderExample').uploader({
//     //autoUpload: true,            // 当选择文件后立即自动进行上传操作
//     url: {:U('Chengji/Chengji/doGradescoreUpload')}  // 文件上传提交地址
// });

</script>

  
</block>